import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:pull_to_refresh_flutter3/pull_to_refresh_flutter3.dart';
import 'package:xindong/common/xindong_sezhi.dart';
import 'package:xindong/common/xindong_define.dart';
import 'package:xindong/routes/tab_moments/controller/xindong_dongtai_actions_ctr.dart';
import 'package:xindong/routes/tab_moments/controller/xindong_dongtai_vm.dart';
import 'package:xindong/routes/tab_moments/details/xindong_dongtai_details_controller.dart';
import 'package:xindong/routes/tab_moments/model/xindong_comment_class.dart';
import 'package:xindong/routes/tab_moments/model/xindong_dongtai_class.dart';
import 'package:xindong/routes/tab_moments/view/xindong_dongtai_list_view_cell.dart';
import 'package:xindong/widgets/common/xindong_app_bar.dart';
import 'package:xindong/widgets/container/xindong_empty_container.dart';
import 'package:xindong/widgets/xindong_avatar.dart';

class XinDongDongTaiDetailsCommentCell extends StatelessWidget {
  final XinDongCommentClass model;

  const XinDongDongTaiDetailsCommentCell({super.key, required this.model});

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: const EdgeInsets.all(kPaddingValue),
      decoration: const BoxDecoration(
        border: Border(bottom: BorderSide(color: DZColors.dividerColor, width: 0.5)),
      ),
      child: Row(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          XinDongAvatar(url: model.head_100, size: 46),
          const SizedBox(width: 10),
          Expanded(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                Row(
                  children: [
                    Expanded(
                      child: Text(
                        "${model.name}",
                        style: const TextStyle(fontSize: 13, color: DZColors.contentColor),
                      ),
                    ),
                    Text(
                      "${model.addtime}",
                      textAlign: TextAlign.center,
                      style: const TextStyle(fontSize: 13, color: DZColors.placeholderColor),
                    ),
                  ],
                ),
                const SizedBox(height: 3),
                Text(
                  model.content,
                  style: const TextStyle(fontSize: 15, color: DZColors.titleColor),
                ),
              ],
            ),
          ),
        ],
      ),
    );
  }
}
